#include <51func.h>
int main(int argc, char *argv[])
{
    // ./10_lseek file1
    ARGS_CHECK(argc,2);
    int fd = open(argv[1],O_RDWR);
    ERROR_CHECK(fd,-1,"open");
    char ch;
    for(int i = 0; i < 5; ++i){
        read(fd,&ch,sizeof(char));
        if(ch >= 'a' && ch <= 'z'){
            ch -= 32;
        }
        lseek(fd,-1,SEEK_CUR);
        write(fd,&ch,sizeof(char));
    }
    close(fd);
    return 0;
}

